package com.ccys.cms.controller.masterData;

import com.ccys.cms.service.masterData.FlagReasonService;
import com.ccys.common.constants.TouristApi;
import com.ccys.common.vo.ResponseResult;
import com.ccys.db.dto.masterData.FlagReasonDelDto;
import com.ccys.db.dto.masterData.FlagReasonPageQueryDto;
import com.ccys.db.dto.masterData.FlagReasonSaveDto;
import com.ccys.db.vo.masterData.FlagReasonPageQueryVo;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: WhiteCoat
 * @description: 病人标签接口
 * @author: ZhangJingCan
 * @create: 2023-12-13 10:01
 **/

@RestController
@RequestMapping("masterData")
@Api(tags = "masterData-病人标签接口")
public class FlagReasonController {

    @Autowired
    private FlagReasonService flagReasonService;


    
    @PostMapping("flagReason")
    @ApiOperation("保存病人标签")
    public ResponseResult saveFlagReason(FlagReasonSaveDto dto) {
        return flagReasonService.saveFlagReason(dto);
    }

    @PutMapping("flagReason")
    @ApiOperation("修改病人标签")
    public ResponseResult edit(FlagReasonSaveDto dto) {
        return flagReasonService.saveFlagReason(dto);
    }

    
    @DeleteMapping("flagReason")
    @ApiOperation("根据ID删除病人标签")
    public ResponseResult deleteFlagReason(FlagReasonDelDto dto) {
        return flagReasonService.deleteFlagReason(dto);
    }

    
    @GetMapping("flagReason")
    @ApiOperation("分页查询病人标签")
    public ResponseResult<PageInfo<FlagReasonPageQueryVo>, Object> findPageFlagReason(FlagReasonPageQueryDto dto) {
        return flagReasonService.findPageFlagReason(dto);
    }

}
